package com.cloud.wms.ui.group.entity;

import android.os.Parcel;

import com.cloud.wms.ui.main.entity.MemberEntity;

/**
 * @Author:Chen
 * @Date: 2021-03-05 14:37
 * @Description:
 */
public class GroupBatchInfoEntity extends MemberEntity {

    /**
     * BillCode : S7987965616565
     * BillID : 12343
     * ContainerCode : 895654
     * ContainerID : 898
     * CommodityList : [{"PosCode":"K01-0-01","PosID":12343,"CommodityID":7867887,"CommodityName":"测试商品","BarCode":"436546","CommodityCodeList":["436546"],"Amount":13,"NeedSortAmount":1,"StockType":1}]
     */

    private String batchCode;
    private long batchID;
    private String skuAmount;
    private String totalAmount;
    private String batchTypeName;
    private String createDate;
    private String collectCode;

    public String getCollectCode() {
        return collectCode == null ? "" : collectCode;
    }

    public void setCollectCode(String collectCode) {
        this.collectCode = collectCode;
    }

    public String getBatchCode() {
        return batchCode == null ? "" : batchCode;
    }

    public void setBatchCode(String batchCode) {
        this.batchCode = batchCode;
    }

    public long getBatchID() {
        return batchID;
    }

    public void setBatchID(long batchID) {
        this.batchID = batchID;
    }

    public String getSkuAmount() {
        return skuAmount == null ? "" : skuAmount;
    }

    public void setSkuAmount(String skuAmount) {
        this.skuAmount = skuAmount;
    }

    public String getTotalAmount() {
        return totalAmount == null ? "" : totalAmount;
    }

    public void setTotalAmount(String totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getBatchTypeName() {
        return batchTypeName == null ? "" : batchTypeName;
    }

    public void setBatchTypeName(String batchTypeName) {
        this.batchTypeName = batchTypeName;
    }

    public String getCreateDate() {
        return createDate == null ? "" : createDate.replace("T", " ");
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public GroupBatchInfoEntity() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeString(this.batchCode);
        dest.writeLong(this.batchID);
        dest.writeString(this.skuAmount);
        dest.writeString(this.totalAmount);
        dest.writeString(this.batchTypeName);
        dest.writeString(this.createDate);
        dest.writeString(this.collectCode);
    }

    protected GroupBatchInfoEntity(Parcel in) {
        super(in);
        this.batchCode = in.readString();
        this.batchID = in.readLong();
        this.skuAmount = in.readString();
        this.totalAmount = in.readString();
        this.batchTypeName = in.readString();
        this.createDate = in.readString();
        this.collectCode = in.readString();
    }

    public static final Creator<GroupBatchInfoEntity> CREATOR = new Creator<GroupBatchInfoEntity>() {
        @Override
        public GroupBatchInfoEntity createFromParcel(Parcel source) {
            return new GroupBatchInfoEntity(source);
        }

        @Override
        public GroupBatchInfoEntity[] newArray(int size) {
            return new GroupBatchInfoEntity[size];
        }
    };
}
